cmake_minimum_required(VERSION 3.17)
project(lab8 C)

set(CMAKE_C_STANDARD 11)

include_directories(.)
include_directories(kern)
include_directories(kern/debug)
include_directories(kern/driver)
include_directories(kern/fs)
include_directories(kern/fs/devs)
include_directories(kern/fs/sfs)
include_directories(kern/fs/swap)
include_directories(kern/fs/vfs)
include_directories(kern/init)
include_directories(kern/libs)
include_directories(kern/mm)
include_directories(kern/process)
include_directories(kern/schedule)
include_directories(kern/sync)
include_directories(kern/syscall)
include_directories(kern/trap)
include_directories(libs)
include_directories(tools)
include_directories(user)
include_directories(user/libs)

add_executable(lab8
        kern/debug/assert.h
        kern/debug/kdebug.c
        kern/debug/kdebug.h
        kern/debug/kmonitor.c
        kern/debug/kmonitor.h
        kern/debug/panic.c
        kern/debug/stab.h
        kern/driver/clock.c
        kern/driver/clock.h
        kern/driver/console.c
        kern/driver/console.h
        kern/driver/ide.c
        kern/driver/ide.h
        kern/driver/intr.c
        kern/driver/intr.h
        kern/driver/kbdreg.h
        kern/driver/picirq.c
        kern/driver/picirq.h
        kern/driver/ramdisk.c
        kern/driver/ramdisk.h
        kern/fs/devs/dev.c
        kern/fs/devs/dev.h
        kern/fs/devs/dev_disk0.c
        kern/fs/devs/dev_stdin.c
        kern/fs/devs/dev_stdout.c
        kern/fs/sfs/bitmap.c
        kern/fs/sfs/bitmap.h
        kern/fs/sfs/sfs.c
        kern/fs/sfs/sfs.h
        kern/fs/sfs/sfs_fs.c
        kern/fs/sfs/sfs_inode.c
        kern/fs/sfs/sfs_io.c
        kern/fs/sfs/sfs_lock.c
        kern/fs/swap/swapfs.c
        kern/fs/swap/swapfs.h
        kern/fs/vfs/inode.c
        kern/fs/vfs/inode.h
        kern/fs/vfs/vfs.c
        kern/fs/vfs/vfs.h
        kern/fs/vfs/vfsdev.c
        kern/fs/vfs/vfsfile.c
        kern/fs/vfs/vfslookup.c
        kern/fs/vfs/vfspath.c
        kern/fs/file.c
        kern/fs/file.h
        kern/fs/fs.c
        kern/fs/fs.h
        kern/fs/iobuf.c
        kern/fs/iobuf.h
        kern/fs/sysfile.c
        kern/fs/sysfile.h
        kern/init/init.c
        kern/libs/readline.c
        kern/libs/stdio.c
        kern/libs/string.c
        kern/mm/default_pmm.c
        kern/mm/default_pmm.h
        kern/mm/kmalloc.c
        kern/mm/kmalloc.h
        kern/mm/memlayout.h
        kern/mm/mmu.h
        kern/mm/pmm.c
        kern/mm/pmm.h
        kern/mm/swap.c
        kern/mm/swap.h
        kern/mm/swap_fifo.c
        kern/mm/swap_fifo.h
        kern/mm/vmm.c
        kern/mm/vmm.h
        kern/process/proc.c
        kern/process/proc.h
        kern/schedule/default_sched.h
        kern/schedule/default_sched_stride.c
        kern/schedule/sched.c
        kern/schedule/sched.h
        kern/sync/check_sync.c
        kern/sync/monitor.c
        kern/sync/monitor.h
        kern/sync/sem.c
        kern/sync/sem.h
        kern/sync/sync.h
        kern/sync/wait.c
        kern/sync/wait.h
        kern/syscall/syscall.c
        kern/syscall/syscall.h
        kern/trap/trap.c
        kern/trap/trap.h
        libs/atomic.h
        libs/defs.h
        libs/dirent.h
        libs/elf.h
        libs/error.h
        libs/hash.c
        libs/list.h
        libs/printfmt.c
        libs/rand.c
        libs/riscv.h
        libs/sbi.h
        libs/skew_heap.h
        libs/stat.h
        libs/stdarg.h
        libs/stdio.h
        libs/stdlib.h
        libs/string.c
        libs/string.h
        libs/unistd.h
        tools/mksfs.c
        tools/sign.c
        tools/vector.c
        user/libs/dir.c
        user/libs/dir.h
        user/libs/file.c
        user/libs/file.h
        user/libs/lock.h
        user/libs/panic.c
        user/libs/stdio.c
        user/libs/syscall.c
        user/libs/syscall.h
        user/libs/ulib.c
        user/libs/ulib.h
        user/libs/umain.c
        user/badarg.c
        user/badsegment.c
        user/divzero.c
        user/exit.c
        user/faultread.c
        user/faultreadkernel.c
        user/forktest.c
        user/forktree.c
        user/hello.c
        user/matrix.c
        user/pgdir.c
        user/priority.c
        user/sh.c
        user/sleep.c
        user/sleepkill.c
        user/softint.c
        user/spin.c
        user/testbss.c
        user/waitkill.c
        user/yield.c)
